package com.jiangong.controller;

import com.jiangong.entity.Result;
import com.jiangong.service.GenerateElectricityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/generateElectricity")
public class GenerateElectricityController {
    @Autowired
    private GenerateElectricityService generateElectricityService;
    @RequestMapping("/findAll")
    public Result findAll() {
        return Result.success(generateElectricityService.findAll());
    }
    @RequestMapping("/IrrationTotal24")
    public Result IrrationTotal() {
        return Result.success(generateElectricityService.IrrationTotal());
    }
    @RequestMapping("/IrrationTotal30")
    public Result IrrationTotal30() {
        return Result.success(generateElectricityService.IrrationTotal30());
    }
    @RequestMapping("/powerTotal24")
    public Result powerTotal() {
        return Result.success(generateElectricityService.powerTotal24());
    }

}
